package com.xingda.packing.minitor.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xingda.packing.common.R;
import com.xingda.packing.minitor.entity.PkVisualSense;
import com.xingda.packing.minitor.service.PkVisualSenseService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/visualSense")
public class PkVisualSenseController {
    @Resource
    private PkVisualSenseService pkVisualSenseService;

    @GetMapping("/getPage")
    public R getList(Integer area, Long current, Long size,String keyword) {
        try {
            IPage<PkVisualSense> list = pkVisualSenseService.getList(area, current, size,keyword);
            return R.ok().put("data", list);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return R.error();
    }
}
